package cn.deschen.biz.dto.search;

import cn.deschen.biz.dto.search.feature.FeatureRelation;
import cn.deschen.biz.dto.search.feature.KeywordFeature;
import cn.deschen.biz.dto.search.feature.RegionFeature;
import cn.deschen.biz.dto.search.feature.TagFeature;
import cn.deschen.biz.dto.search.media.AdSlot;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author hanbin_chen
 * @Description 搜索广告查询条件
 * @DateTime 2021/6/24
 * @Version V1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="搜索广告获取条件", description="")
public class AdSearchFetchDTO {

    @ApiModelProperty(value = "媒体方的请求标识")
    private String mediaId;

    @ApiModelProperty(value = "请求基本信息")
    private RequestInfo requestInfo;

    @ApiModelProperty(value = "匹配信息")
    private FeatureInfo featureInfo;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RequestInfo {

        @ApiModelProperty(value = "请求ID")
        private String requestId;

        @ApiModelProperty(value = "广告位集合")
        private List<AdSlot> adSlots;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class FeatureInfo {

        @ApiModelProperty(value = "匹配条件-兴趣标签")
        private TagFeature tagFeature;

        @ApiModelProperty(value = "匹配条件-关键字")
        private KeywordFeature keywordFeature;

        @ApiModelProperty(value = "匹配条件-地区")
        private RegionFeature regionFeature;

        @ApiModelProperty(value = "匹配条件关系")
        private FeatureRelation relation;
    }

}
